<?xml version='1.0' encoding='ISO-8859-1' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"   
      xmlns:jb="http://java.sun.com/jsf/composite/componentes"
      xmlns:p="http://primefaces.org/ui">

    <SCRIPT language="JavaScript" type="text/javascript">
                   
        function handleRequestPer(xhr, status, args) {                     
            if(args.validationFailed || !args.CallbackParam) {  
                
            } else {                              
                carDialogPer.hide();  
                jQuery('#btnGuardarPer').fadeOut();  
            }
        }  
    </SCRIPT>
    <h:form onsubmit="return checkSubmit();"  id="frmPer">
        <h:panelGrid id="pgFormDtoPer" frame="box">
            <h:panelGrid  columns="4" cellpadding="4">
                
                <h:outputLabel for="itTipoPer" styleClass="label" value="#{i18n['form.maquina.tipo.periodicidad']}"/>
                <p:selectOneMenu id="itTipoPer" value="#{maquinaMBean.detaPerDto.tipoPeriodicidadDto}" required="true" converter="parametroConvert" style="#{applicationMBean.estiloObligatorio}" disabled="#{sessionMBean.accionDetalle == applicationMBean.ver}">
                    <f:selectItems value="#{maquinaMBean.listaTipoPer}" var="parametroDto" itemLabel="#{parametroDto.descripcion}" itemValue="#{parametroDto}"/>
                </p:selectOneMenu>
                
                <h:outputLabel styleClass="label" value="#{i18n['form.maquina.turno']}"/>                    
                <p:selectOneMenu value="#{maquinaMBean.detaPerDto.turno}"
                                 style="#{applicationMBean.estiloObligatorio}"
                                 disabled="#{sessionMBean.accionDetalle == applicationMBean.ver}">
                    <f:selectItems value="#{maquinaMBean.listaTurnos}"/>
                </p:selectOneMenu>
                
                <h:outputLabel for="itDiaMes" value="#{i18n['form.maquina.dia.mes']}" styleClass="label"/>
                <p:inputText id="itDiaMes" label="#{i18n['form.maquina.dia.mes']}" style="#{applicationMBean.estiloObligatorio}"
                             value="#{maquinaMBean.detaPerDto.diaMes}" readonly="#{sessionMBean.accionDetalle == applicationMBean.ver}"
                             onkeypress="return fn_validaTecla('entero',this)"
                             required="false" size="10">
                    <f:validateLength minimum="1" maximum="9"/>
                    <f:convertNumber pattern="#{applicationMBean.formatoMontos}"/>
                </p:inputText>
                
                <h:outputLabel for="itFechaInic" value="#{i18n['form.maquina.fecha.inicio']}" styleClass="label"/>
                <p:calendar id="itFechaInic" value="#{maquinaMBean.detaPerDto.fechaInic}" label="#{i18n['form.maquina.fecha.inicio']}" pattern="#{applicationMBean.formatoFecha}"  required="true"
                            style="#{applicationMBean.estiloObligatorio}" disabled="#{sessionMBean.accionDetalle == applicationMBean.ver}" > 
                </p:calendar>
                
                <h:outputLabel styleClass="label" value="#{i18n['form.maquina.dia.semana']}"/>                    
                <p:selectOneMenu value="#{maquinaMBean.detaPerDto.diaSemana}"
                                 style="#{applicationMBean.estiloObligatorio}"
                                 disabled="#{sessionMBean.accionDetalle == applicationMBean.ver}">
                    <f:selectItems value="#{maquinaMBean.listaDiaSemana}"/>
                </p:selectOneMenu>
                
                <h:outputLabel styleClass="label" value="#{i18n['form.maquina.excluir']}"/>
                <p:selectBooleanCheckbox value="#{maquinaMBean.detaPerDto.excluir}" style="#{applicationMBean.estilo}" disabled="#{sessionMBean.accionDetalle == applicationMBean.ver}"/>
            </h:panelGrid>
        
            <p:panel id="pnlAcciones" rendered="#{sessionMBean.accionDetalle != applicationMBean.ver}">
                <h:panelGrid columns="10">
                    <p:commandButton id="btnGuardarPer" update=":msjDialogPer,:tabPrincMant:frmPopupPer:tblPeriodicidad, :msgs"
                                     title="#{i18n['general.button.guardar.tip']}"
                                     style="#{applicationMBean.estilosBtnGuardar}"
                                     ajax="true"
                                     icon="ui-icon ui-icon-disk" rendered="#{sessionMBean.accionDetalle != applicationMBean.ver}"
                                     value="#{i18n['general.button.guardar']}"
                                     action="#{maquinaMBean.guardarPer}"
                                     oncomplete="handleRequestPer(xhr, status, args);"
                                     >
                    </p:commandButton>
                </h:panelGrid>
            </p:panel>
        </h:panelGrid>  
    </h:form>
</html>